#ifndef BASICOBJECT_H_INCLUDED
#define BASICOBJECT_H_INCLUDED

#include "Parameter.h"
#include <vector>
#include <libxml++/libxml++.h>

struct Coordinates
{
	double r1,r2,r3;
};

typedef Coordinates Direction;

class BasicObject
{
	protected:

	unsigned long id;

	std::vector<Parameter> parameters;
	std::vector<BasicObject*> parents;
	std::vector<unsigned long> parentIDs;

	public:

	void readFromXML(xmlpp::Node* node);
	void writeToXML(); //TODO

	unsigned long getID();
	void setID(unsigned long id);

	virtual void construct(std::vector<BasicObject*>& list);
	virtual Coordinates evaluateParameters(std::vector<BasicObject*> parents, std::vector<Parameter> parameters) = 0;

	static unsigned long generateID(const std::vector<BasicObject*>& list);

	virtual ~BasicObject();
};

#endif // BASICOBJECT_H_INCLUDED
